/**
 * 
 */
package com.huxi.lang.file;

import java.io.IOException;
import java.io.InputStream;
import java.util.stream.Stream;

/**
 * @author jian.wu
 *
 */
public interface FileParser<T> {

	Stream<T> read(InputStream in) throws IllegalFileException, IOException;

	default Stream<T> read(IoFile file) throws IllegalFileException, IOException{
		return read(file.getInputStream());
	}
}
